{extends file="./main.tpl"}
{block name=head}
<script language="javascript">
function passwordMatch()
{
  if(document.party.userpassword.value != document.party.userpasswordCom.value)
  {
    alert("Password Miss Match!!!!!");
    document.party.userpasswordCom.value="";
    document.party.userpassword.focus();
  }
}
</script>
{/block}
{block name=body}
<form name="party" action="" method="post">
<center><font color='red'><b>{$msg}</b></font></center>
<table align="center" border="0" cellpadding="2" cellspacing="2" >
<tr>
  <td align="center" class="table1" colspan="2"> * *CREATE NEW USER * *</td>
</tr>
<tr>
  <td class="table1" align="left"><b>User Name :</b></td>
  <td class="table1"><input type="text" name="userName" id="userName" autofocus=autofocus required="required" ></td>
</tr>
<tr>
  <td class="table1" align="left"><b>Password :</b></td>
  <td class="table1"><input type="password" name="userpassword" id="userpassword"  required="required" ></td>
</tr>
<tr>
  <td class="table1" align="left"><b>Confirm Password :</b></td>
  <td class="table1"><input type="password" name="userpasswordCom" id="userpasswordCom" onblur="passwordMatch();"  required="required" ></td>
</tr>
<tr>
  <td class="table1" align="center" colspan="2"><input type="submit" name="userIns"  value="Create User" class="button" /></td>
</tr>
</table>
<br>
<br>
<table align="center" border="0" cellpadding="2" cellspacing="2" >
<tr>
  <td align="center" class="table1" colspan="2"><b>USER LIST</b></td>
</tr>
<tr>
  <td class="table2" align="left"><b>User Name</b></td>
  <td class="table2" align="left"><b>User Type</b></td>
  <td class="table2" align="left"><b>Delete</b></td>
</tr>
{section name=user loop=$userArr}
<tr>
	<td class="table2" align="center">{$userArr[user].userName}</td>
	<td class="table2" align="center">{$userArr[user].userType}</td>
	<td class="table2" align="left"><a onClick='return confirm("R U Sure U Want To Delete");' href="list.php?userId={$userArr[user].userId}">Delete</a></td>
</tr>
{/section}
</table>	
</form>
{/block}